function startCourse()
{
	if( typeof sessionStorage === "undefined" || sessionStorage.disabled )
	{
		alert( "You must enable cookies for this course to work properly." );
	}
	else
	{
		// if it is enabled, checked to see if this course was started
		// if it was not able to retrieve, the key "course_started", then
		// then this is the first time we are running the course
    if( !sessionStorage.getItem( "course_started" ))
    {
        	// clear the session storage
        sessionStorage.clear();
            // set the "key" by giving it a value.  all values are strings!
    		sessionStorage.setItem( "course_started", "1" );
    		sessionStorage.setItem( "finland", "0" );
    		sessionStorage.setItem( "gambia", "0" );
    		sessionStorage.setItem( "bangladesh","0");
    		sessionStorage.setItem( "sudan", "0");
        }
		}
}



function visitFinland()
{
	sessionStorage.setItem ( "finland", "visited" );	
	showQuiz();
}

function visitGambia()
{
	sessionStorage.setItem ( "gambia", "visited" );
	showQuiz();
}

function visitBangladesh()
{
	sessionStorage.setItem ( "bangladesh", "visited" );
	showQuiz();
} 
function visitSudan()
{
	sessionStorage.setItem ( "sudan", "visited" );
	showQuiz();
}

function showQuiz()
{
	var finlandVisited = sessionStorage.getItem( "finland" );
	var gambiaVisited = sessionStorage.getItem( "gambia" );
	var bangladeshVisited = sessionStorage.getItem( "bangladesh" );
	var sudanVisited = sessionStorage.getItem( "sudan" );
	
	if (finlandVisited == "visited" && gambiaVisited == "visited" && bangladeshVisited == "visited" && sudanVisited == "visited" )
		{
			document.getElementById( "menu-link-inactive" ).style.display = "inline";
		}
}